//
//  ZMBNOLoginAlertView.swift
//  HengYouCai
//
//  Created by apple on 2018/5/17.
//  Copyright © 2018年 lwj. All rights reserved.
//

import UIKit
import SnapKit
class ZMBNOLoginAlertView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5)
        let whiteView: UIView = UIView()
        whiteView.backgroundColor = UIColor.white
        self.addSubview(whiteView)
        whiteView.snp.makeConstraints { (make) in
            make.bottom.equalToSuperview()
            make.left.equalToSuperview()
            make.right.equalToSuperview()
            make.height.equalTo(157)
        }
        
        whiteView.addSubview(logoImgView)
        logoImgView.snp.makeConstraints { (make) in
            make.top.equalTo(whiteView).offset(26)
            make.centerX.equalToSuperview()
        }
        
        whiteView.addSubview(logoOrRegistBtn)
        logoOrRegistBtn.snp.makeConstraints { (make) in
            make.bottom.equalTo(whiteView).offset(-20)
            make.left.equalToSuperview().offset(15)
            make.right.equalToSuperview().offset(-15)
            make.height.equalTo(45)
        }
    }
    /// logo
    lazy var logoImgView: UIImageView = {
        let logoView = UIImageView()
        logoView.image = UIImage(named: "home_logo")
        return logoView
    }()
    /// 登录或注册按钮
    lazy var logoOrRegistBtn: UIButton = {
        let temp = UIButton()
        temp.backgroundColor = Normal_336Color
        temp.setTitle("登录/注册", for: .normal)
        temp.setTitleColor(UIColor.white, for: .normal)
        temp.titleLabel?.font = Font_WL(14)
        temp.layer.cornerRadius = 5
        return temp
    }()
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
